home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 February / OpenLinux 2.3 CD.iso / live / usr / share / vim / syntax / nroff.vim < prev    next >
Encoding:
Text File  |  1999-08-10  |  1.3 KB  |  38 lines

  1. " VIM syntax file
  2. " Language: Nroff/Troff
  3. " Maintainer: Matthias Burian <office@grabner-instruments.com>
  4. " Last change: Aug. 18, 1998
  5. "
  6. syn clear
  7.  
  8. syn match nroffCommand "^\.[a-zA-Z]" nextgroup=nroffCmdArg
  9. syn match nroffCommand "^\.[a-zA-Z][a-zA-Z0-9\\]" nextgroup=nroffCmdArg
  10. syn match nroffCmdArg contained ".*" contains=nroffString,nroffComArg
  11. syn region nroffString contained start=/"/ end=/"/ contains=nroffFont
  12. syn region nroffString contained start=/'/ end=/'/ contains=nroffFont
  13. syn match nroffComArg +\\".*+
  14. syn match nroffComment +^\.\\".*+
  15. syn region nroffFont start="\\f[A-Z]"hs=s+3 end="\\f[A-Z]"he=e-3 end="$"
  16. syn region nroffFont start="\\\*<"hs=s+3 end="\\\*>"he=e-3
  17. syn region nroffDefine start="\.ds\ [A-Za-z_]\+" end="$" contains=ALL 
  18. syn region nroffSize start="\\s[0-9]*" end="\\s[0-9]*"
  19. syn region nroffSpecial start="^\.[TP]S$" end="^\.[TP]E$"
  20. syn region nroffSpecial start="^\.EQ$" end="^\.EN$"
  21.  
  22. if !exists("did_nroff_syntax_inits")
  23.   let did_nroff_syntax_inits = 1
  24.   " The default methods for highlighting.  Can be overridden later
  25.   hi link nroffCommand            Statement
  26.   hi link nroffComment            Comment
  27.   hi link nroffComArg            Comment
  28.   hi link nroffFont            PreProc
  29.   hi link nroffSize            PreProc
  30.   hi link nroffDefine            String
  31.   hi link nroffString            String
  32.   hi link nroffSpecial            Question
  33. endif
  34.  
  35. let b:current_syntax = "nroff"
  36.  
  37. " vim: ts=8
  38.